#!/usr/bin/env python3

import rospy
from DrRobotController_six_axes_can.msg import set_arm_relative_pose
# import DrRobotController_six_axes as dr

def callback(data):
    import DrRobotController_six_axes as dr
    dr.set_arm_relative_pose(id_num=data.id_num, pl_temp=data.pl_temp, theta_P_Y_R=data.theta_P_Y_R, speed=data.speed, acceleration=data.acceleration)
    rospy.loginfo("set_arm_relative_pose_node")


def listener():
    rospy.init_node("set_arm_relative_pose", anonymous=True)
    rospy.Subscriber("set_arm_relative_pose", set_arm_relative_pose, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

